// i.d(t, { u: () => Label3DFactory })
import Label3D from "./Label3D"
import * as THREE from "three"

export default class Label3DFactory {
  currentTextConfig: any
  static defaultTextConfig: {
    text: string
    align: string
    wordWrapWidth: any
    color: string
    backgroundColor: string
    backgroundBorderWidth: number
    backgroundBorderHeight: number
    background: boolean
    backgroundAsCollider: boolean
    backgroundColliderType: typeof THREE.Mesh
    scale: number
    outline: boolean
    outlineWidth: number
  }
  constructor(e) {
    this.currentTextConfig = Label3DFactory.defaultTextConfig
    e ? this.updateTextStyle(e) : this.updateTextStyle(Label3DFactory.defaultTextConfig)
  }
  updateTextStyle(e) {
    this.currentTextConfig = Object.assign(Object.assign({}, this.currentTextConfig), e)
  }
  createLabel(e = { text: "" }) {
    return new Label3D(Object.assign(Object.assign({}, this.currentTextConfig), e))
  }
  static makeConfig(e) {
    return Object.assign(Object.assign({}, this.defaultTextConfig), e)
  }
}
Label3DFactory.defaultTextConfig = {
  text: "",
  align: "center",
  wordWrapWidth: void 0,
  color: "black",
  backgroundColor: "white",
  backgroundBorderWidth: 50,
  backgroundBorderHeight: 30,
  background: !0,
  backgroundAsCollider: !0,
  backgroundColliderType: THREE.Mesh,
  scale: 1,
  outline: !1,
  outlineWidth: 4
}
